package com.itls.recommendedgames.control;

import com.itls.recommendedgames.entity.Game;
import com.itls.recommendedgames.service.GameService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/games")
@CrossOrigin
@Tag(name = "游戏管理")
public class GamesController {
    @Resource
private GameService gameService;

@PostMapping("/allGamesWithTags")
public List<Game> getGames() {
   return gameService.findAllGamesWithTags();
}


}
